package cn.jsj.education.file.controller;

import cn.jsj.education.aop.RateLimiter;
import cn.jsj.education.interceptor.swich.PassToken;
import cn.jsj.education.result.Result;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author 卢斌
 */
@Controller
@CrossOrigin
@ResponseBody
public class FileController {

    @PassToken
    @GetMapping(value = "/test", params = {"value"})
    @RateLimiter(10)
    public Result<Integer> test(@RequestParam("value") Integer value) {
        return Result.success(value);
    }


}
